home *** CD-ROM | disk | FTP | other *** search
Modula Definition | 1994-09-22 | 11.0 KB | 334 lines |
- DEFINITION MODULE GEMAESbase;
-
- (* ------------------------------------------------------------- *)
- (* *)
- (* Modula-2 interface to GEM Application Environment Services *)
- (* *)
- (* ------------------------------------------------------------- *)
-
- (* ------------------------------------------------------------- *)
- (* (c) Copyright Lehrstuhl für Prozeßrechner TU München 1987 *)
- (* ------------------------------------------------------------- *)
-
-
-
- FROM SYSTEM IMPORT ADDRESS;
-
- (* ---------------------------------------------------------- *)
-
-
- CONST
- (* Resource manager definitions *)
-
- RTree = 0;
- RObject = 1;
- RTedInfo = 2;
- RIconBlock = 3;
- RBitBlock = 4;
- RString = 5;
- RImageData = 6;
- RObSpec = 7;
- RText = 8;
- RTemplate = 9;
- RValid = 10;
- RIconBlkMask = 11;
- RIconBlkData = 12;
- RIconBlkText = 13;
- RBitBlkData = 14;
- RFreeString = 15;
- RFreeImage = 16;
-
-
- (* Object types *)
-
- GraphicBox = 20; (* Graphic box *)
- GraphicText = 21; (* Graphic text string *)
- GraphicBoxText = 22; (* Graphic box containing text *)
- GraphicImage = 23; (* Graphic bit image *)
- GraphicProgDef = 24; (* Programmer defined graphic object *)
- GraphicInvisibleBox = 25; (* Invisible interior graphic box *)
- GraphicButton = 26; (* Text within an invisible box *)
- GraphicBoxChar = 27; (* Graphic box containing graphic char *)
- GraphicString = 28; (* Graphic text string *)
- GraphicFormattedText = 29; (* Formatted graphic text *)
- GraphicFormattedBoxText = 30; (* Formatted text within a box *)
- GraphicIcon = 31; (* Object that describes an icon *)
- GraphicTitle = 32; (* Graphic text string used for menu title *)
-
- None = 00H; (* Object flags *)
- Selectable = 01H;
- Default = 02H;
- Exit = 04H;
- Editable = 08H;
- RadioButton = 10H;
- LastObject = 20H;
- TouchExit = 40H;
- HideTree = 80H;
- Indirect = 100H;
-
- Normal = 00H; (* Object states *)
- Selected = 01H;
- Crossed = 02H;
- Checked = 04H;
- Disabled = 08H;
- Outlined = 10H;
- Shadowed = 20H;
-
- White = 0; (* Object colours *)
- Black = 1;
- Red = 2;
- Green = 3;
- Blue = 4;
- Cyan = 5;
- Yellow = 6;
- Magenta = 7;
- LightWhite = 8; (* Same as white *)
- LightBlack = 9; (* Same as black *)
- LightRed = 10;
- LightGreen = 11;
- LightBlue = 12;
- LightCyan = 13;
- LightYellow = 14;
- LightMagenta = 15;
-
- CONST
- (* Event manager definitions *)
- KeyboardEvent = 01H; (* Wait for keyboard event *)
- ButtonEvent = 02H; (* Wait for mouse button event *)
- Mouse1Event = 04H; (* Wait for mouse/rectangle event 1 *)
- Mouse2Event = 08H; (* Wait for mouse/rectangle event 2 *)
- MesageEvent = 10H; (* Wait for a message event *)
- TimerEvent = 20H; (* Wait for a timer event *)
-
- (* Keyboard states *)
- KeyRightShift = 01H;
- KeyLeftShift = 02H;
- KeyCTRL = 04H;
- KeyALT = 08H;
-
- (* Message values *)
- MenuSelected = 10; (* Menu item was selected *)
- WindowRedraw = 20; (* Window needs redrawing *)
- WindowTopped = 21; (* A window was moved to the top *)
- WindowClosed = 22; (* Window was closed *)
- WindowFulled = 23; (* Wndow was fulled *)
- WindowArrowed = 24; (* Window was arrowed *)
- WindowHorizSlided = 25; (* Horizontal slider was moved *)
- WindowVertSlided = 26; (* Vertical slider was moved *)
- WindowSized = 27; (* Window was sized *)
- WindowMoved = 28; (* Window was moved *)
- WindowNewTop = 29; (* Window was moved to top (activated) *)
- AccessoryOpen = 40; (* Accessory requested to open *)
- AccessoryClose = 41; (* Accessory requested to close *)
-
-
- (* Graphics manager definitions *)
- Arrow = 0; (* Mouse forms *)
- TextCursor = 1;
- HourGlass = 2;
- PointHand = 3;
- FlatHand = 4;
- ThinCross = 5;
- ThickCross = 6;
- OutlineCross= 7;
- UserDef = 255;
- MouseOff = 256;
- MouseOn = 257;
-
-
- (* Form manager definitions *)
- FormStart = 0; (* Reserve screen area for dialog box *)
- FormGrow = 1; (* Grow the dialog box *)
- FormShrink = 2; (* Shrink the dialog box *)
- FormFinish = 3; (* Tell application to redraw window *)
-
-
- (* Window attributes, used for CreateWindow call *)
- Name = 001H; (* Title bar with name *)
- Closer = 002H; (* Close box *)
- Fuller = 004H; (* Full box *)
- Mover = 008H; (* Move box *)
- InfoLine = 010H; (* Information line *)
- Sizer = 020H; (* Size box *)
- UpArrow = 040H; (* Up arrow *)
- DownArrow = 080H; (* Down arrow *)
- VertSlide = 100H; (* Vertical slider *)
- LeftArrow = 200H; (* Left arrow *)
- RightArrow = 400H; (* Right arrow *)
- HorizSlide = 800H; (* Horizontal slider *)
-
- (* Window create flags *)
- WCBorder = 0;
- WCWork = 1;
-
- (* Window get flags *)
- WindowKind = 1; (* Kind of window *)
- WindowName = 2; (* Name of window *)
- WindowInfo = 3; (* Window information *)
- WorkXYWH = 4; (* Get windows working origin and extent *)
- CurrXYWH = 5; (* Get windows entire origin and extent *)
- PrevXYWH = 6; (* Get windows previous origin and extent *)
- FullXYWH = 7; (* Get windows full origin and extent *)
- WindowHorizSlide= 8; (* Get windows horizontal slider position *)
- WindowVertSlide = 9; (* Get windows vertical slider position *)
- Top = 10; (* Get handle of window that is on top (active) *)
- FirstXYWH = 11; (* Get first rectangle in list of window *)
- NextXYWH = 12; (* Get next rectangle in list of window *)
- Reserved = 13; (* Reserved *)
- NewDesk = 14; (* Info on new desk *)
- HorizSliderSize = 15; (* Size of horizontal slider *)
- VertSliderSize = 16; (* Size of vertical slider *)
- WindowScreen = 17; (* Get info on screen *)
-
- (* update flags *)
- EndUpdate = 0; (* Tell GEM window update is complete *)
- BeginUpdate = 1; (* Tell GEM application is updating a window *)
- EndMoueControl = 3; (* Tell GEM that it controls the mouse *)
- BeginMouseControl = 4; (* Tell GEM that application controls mouse *)
-
-
- (* Object definitions *)
-
- TYPE
-
- Object = RECORD
- next: CARDINAL;
- head: CARDINAL;
- tail: CARDINAL;
- type: CARDINAL;
- flags: CARDINAL;
- state: CARDINAL;
- spec: ADDRESS;
- x, y: CARDINAL;
- width: CARDINAL;
- height: CARDINAL;
- END;
-
-
- TEdInfo = RECORD
- ptext: ADDRESS;
- ptmplt: ADDRESS;
- pvalid: ADDRESS;
- font: CARDINAL;
- junkl: CARDINAL;
- just: CARDINAL;
- color: CARDINAL;
- junk2: CARDINAL;
- thickness: CARDINAL;
- txtlen: CARDINAL;
- tmplen: CARDINAL
- END;
-
-
- IconBlk = RECORD
- pmask: ADDRESS;
- pdata: ADDRESS;
- ptext: ADDRESS;
- iChar: INTEGER;
- xChar: INTEGER;
- yChar: INTEGER;
- x, y: INTEGER;
- width: INTEGER;
- height: INTEGER;
- xText: INTEGER;
- yText: INTEGER;
- wText: INTEGER;
- hText: INTEGER;
- END;
-
-
- BitBlk = RECORD
- pdate: ADDRESS;
- width: INTEGER;
- height: INTEGER;
- x, y: INTEGER;
- colour: INTEGER
- END;
-
-
- ApplBlk = RECORD
- code: ADDRESS;
- param: LONGINT
- END;
-
- ParamBlk = RECORD
- pTree: ADDRESS;
- object: INTEGER;
- preState: INTEGER;
- curState: INTEGER;
- x, y, w, h: INTEGER;
- xc, yc,
- wc, hc: INTEGER;
- param: LONGINT
- END;
-
-
- TYPE
- AESGlobalType = RECORD
- apVersion : CARDINAL;
- apCount : CARDINAL;
- apID : CARDINAL;
- apPrivate : LONGCARD;
- apPTree : ADDRESS ;
- ap1Resv : LONGCARD;
- ap2Resv : LONGCARD;
- ap3Resv : LONGCARD;
- ap4Resv : LONGCARD;
- END;
-
- AESControlType = RECORD
- opcode : CARDINAL;
- sizeIntIn : CARDINAL;
- sizeIntOut : CARDINAL;
- sizeAddrIn : CARDINAL;
- sizeAddrOut : CARDINAL;
- END;
-
- AESIntInType = ARRAY [0..16] OF INTEGER;
- AESIntOutType = ARRAY [0..7] OF INTEGER;
- AESAddrInType = ARRAY [0..2] OF ADDRESS;
- AESAddrOutType = ARRAY [0..1] OF ADDRESS;
-
- AESParameterType = RECORD
- control : POINTER TO AESControlType;
- global : POINTER TO AESGlobalType;
- intIn : POINTER TO AESIntInType;
- intOut : POINTER TO AESIntOutType;
- addrIn : POINTER TO AESAddrInType;
- addrOut : POINTER TO AESAddrOutType;
- END;
-
- VAR
- (* Normal global data interfaces to GEM AES *)
-
- AESParameters : AESParameterType;
- AESGlobal : AESGlobalType;
- AESControl : AESControlType;
- AESIntIn : AESIntInType;
- AESIntOut : AESIntOutType;
- AESAddrIn : AESAddrInType;
- AESAddrOut : AESAddrOutType;
-
- AESCallResult : INTEGER; (* global result set by GemCall *)
-
-
- PROCEDURE AESError;
-
- PROCEDURE GemCall (Opcode, Cntrl1, Cntrl2, Cntrl3, Cntrl4: INTEGER): INTEGER;
-
-
- PROCEDURE IntIn2 (I1, I2: INTEGER);
-
- PROCEDURE IntIn3 (I1, I2, I3: INTEGER);
-
- PROCEDURE IntIn4 (I1, I2, I3, I4: INTEGER);
-
- PROCEDURE IntIn8 (I1, I2, I3, I4, I5, I6, I7, I8: INTEGER);
-
- PROCEDURE IntOut2 (VAR I1, I2: INTEGER);
-
- PROCEDURE IntOut4 (VAR I1, I2, I3, I4: INTEGER);
-
-
- END GEMAESbase.
-